﻿@using System.Data;
@using System.Web;
@using DTcms.Web.MVC.Areas.Web.Controllers;
@using DTcms.Web.MVC.UI.Controllers;
@using DTcms.Model;
@{
   Layout = "~/Areas/Web/Views/" + ViewBag.TemplateSkin + "/web/Shared/_Layout.cshtml";
   DTcms.Model.channel_site site = ViewData["site"] as DTcms.Model.channel_site;
   DTcms.Model.siteconfig config = ViewData["config"] as DTcms.Model.siteconfig;
   BaseController bc = ViewBag.BasePage as BaseController;
   ViewBag.Title = "视频专区 - " + site.name;
   DataTable list = null;
   string channel = "video";
}
@section HeaderContent{
<script src="~/Scripts/jquery/jquery.flexslider-min.js"></script>
<script>
$(function(){
	$(".focusbox").flexslider({
		directionNav: false,
		pauseOnAction: false
	});
});
</script>
}

<div class="section clearfix">
  <div class="line15"></div>
  <div class="wrapper clearfix">
    <div class="main-left">
      <div class="focusbox">
        <ul class="slides">
          @{ 
          list = bc.get_article_list(channel, 0, 5, "status=0 and is_slide=1");
          foreach(DataRow dr in list.Rows){
          <li>
            <a title="@dr["title"]" href="@bc.linkurl("video_show",@dr["id"])">
              <span class="note-bg"></span>
              <span class="note-txt">@dr["title"]</span>
              <img src="@dr["img_url"]" />
            </a>
          </li>
          }
          }
        </ul>
      </div>
    </div>
    <div class="main-right">
      <ul class="img-list ilist">
        @{ 
        list = bc.get_article_list(channel, 0, 6, "status=0 and is_red=1");
        foreach(DataRow dr in list.Rows){
        <li>
          <a title="@dr["title"]" href="@bc.linkurl("video_show",dr["id"])">
            <em></em>
            <span class="abs-bg"></span>
            <span class="txt1">@dr["title"]</span>
            <span class="txt2">
              <p>@dr["sub_title"]</p>
            </span>
            <img src="@dr["img_url"]" />
          </a>
        </li>
        }
        }
      </ul>
    </div>
  </div>
</div>

<!--分类列表-->
@{ 
list = bc.get_category_child_list(channel,0);
foreach(DataRow dr in list.Rows){
<div class="section clearfix">
  <div class="ntitle">
    <h2>
      <a href="@bc.linkurl("video_list",dr["id"])">@dr["title"]<em></em></a>
    </h2>
    <p>
      <!--小类-->
      @{ 
      DataTable bcategoryList = bc.get_category_child_list(channel,Convert.ToInt32(dr["id"]));
      int cdrcount = 0;
      foreach(DataRow cdr2 in bcategoryList.Rows){
         cdrcount++;
         if (cdrcount == 1) {
         <a class="no-bg" href="@bc.linkurl("video_list",cdr2["id"])">@cdr2["title"]</a>
         }
         else {
         <a href="@bc.linkurl("video_list",cdr2["id"])">@cdr2["title"]</a>
         }
      }
      }
    </p>
  </div>
  <div class="wrapper clearfix">
    <ul class="img-list high ilist">
      @{ 
      DataTable dt = bc.get_article_list(channel, Convert.ToInt32(dr["id"]), 5, "status=0");
      foreach(DataRow dr1 in dt.Rows){
      <li>
        <a title="@dr1["title"]" href="@bc.linkurl("video_show",dr1["id"])">
          <em></em>
          <span class="abs-bg"></span>
          <span class="txt1">@dr1["title"]</span>
          <span class="txt2">
            <p>@dr1["sub_title"]</p>
          </span>
          <img src="@dr1["img_url"]" />
        </a>
      </li>
      }
      }
    </ul>
  </div>
</div>
}
}
<!--/分类列表-->